package com.dfqy.pojo;


import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Admin implements Serializable {
    private long id;
    private String phone;//手机号
    private String realName;//姓名
    private String pass;//密码
    private String uname;//登录名

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date addTime;//注册时间
    private String pos;//职务
    private long roles;//权限

    public Admin(String phone, String realName, String pass, String uname, Date addTime, String pos, long roles) {
        this.phone = phone;
        this.realName = realName;
        this.pass = pass;
        this.uname = uname;
        this.addTime = addTime;
        this.pos = pos;
        this.roles = roles;
    }
}
